package com.springfox.controller;

import com.springfox.entity.People;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/people")
@Api(tags = {"mydemo"},description = "描述")
public class UserController {

    @RequestMapping("/getPeople")
    @ApiOperation(value="接口描述",notes = "接口提示信息")
    public People getPeople(String id, @ApiParam(value="姓名",required = true) String name, String address){
        People peo = new People();
        peo.setId(id);
        peo.setName(name);
        peo.setAddress("海淀");
        return peo;
    }
}
